﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CommandPattern
{
    class ConcreteCommand1:Command
    {
        private Receiver _receiver;

        public ConcreteCommand1(Receiver receiver)
        {
            this._receiver = receiver;
        }

        /// <summary>
        /// 必须实现一个命令
        /// </summary>
        public override void Execute()
        {
            this._receiver.DoSomething();
        }
    }
}
